﻿namespace SharpF2.Components
{
	using System;
	using System.Globalization;
	using System.Windows.Data;
	using System.Windows.Media;

	public class BooleanToColorConverter : IValueConverter
	{
		#region IValueConverter Members

		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return (bool) value ? Brushes.DarkOrange : normalBrush;
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotSupportedException();
		}

		#endregion

		#region Private Attributes

		private static readonly SolidColorBrush normalBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0x59, 0x59, 0x59));

		#endregion
	}
}